﻿@model GameSchool.ViewModels.Home.RecentViewModel
@{
    ViewBag.Title = "Forsíða";
}
<h2>
    Nýlegt efni</h2>
@if (User.IsInRole("Admin"))
{
    <ul>
        @foreach (var item in Model.recentAdmin)
        {
            <li>@item.RecentDate.ToString("dd.MM.yyyy HH:mm:ss") - @item.RecentText</li>
        }
    </ul>
}
else if (User.IsInRole("Kennari"))
{
    <ul>
        @foreach (var item in Model.recentTeacher)
        {
            <li>@item.RecentDate.ToString("dd.MM.yyyy HH:mm:ss") - @item.RecentText</li>
        }
    </ul>
}
else
{
    <ul>
        @foreach (var item in Model.recentStudent)
        {
            <li>@item.RecentDate.ToString("dd.MM.yyyy HH:mm:ss") - @item.RecentText</li>
        }
    </ul>
}
